
########################################################
import numpy as np

P1 = np.mat([0.2, 0.4, 0.4])
P = np.mat([[0.8, 0.1, 0.1],[0.5, 0.1, 0.4],[0.5, 0.3, 0.2]])
P2 = P1 @ P  
print('P2:', P2)

P4 = P1 @ P ** 3 
print('P4:', P4)

P20 = P1 @ P ** 19 
print('P20:', P20)

P30 = P1 @ P ** 29 
print('P30:', P30)
